package info.motteke.net;

import java.io.InputStream;

public class Response {

    private Builder param;

    private Response(Builder builder) {
        this.param = builder;
    }

    public InputStream getInputStream() {

        return this.param.getInputStream();
    }

    public StatusCode getStatusCode() {

        return this.param.getStatusCode();
    }

    public String getMessage() {

        return this.param.getMessage();
    }

    public String getContentType() {

        return this.param.getContentType();
    }

    public String getContentEncoding() {

        return this.param.getContentEncoding();
    }

    public int getContentLength() {

        return this.param.getContentLength();
    }

    public static class Builder {
        private InputStream inputStream;

        private StatusCode statusCode;

        private String message;

        private String contentType;

        private String contentEncoding;

        private int contentLength;

        /**
         * @return is
         */
        public InputStream getInputStream() {

            return this.inputStream;
        }

        public Builder inputStream(InputStream is) {

            this.inputStream = is;
            return this;
        }

        /**
         * @return sc
         */
        public StatusCode getStatusCode() {

            return this.statusCode;
        }

        public Builder statusCode(StatusCode statusCode){
            this.statusCode = statusCode;
            return this;
        }

        /**
         * @return message
         */
        public String getMessage() {

            return this.message;
        }

        public Builder message(String message){
            this.message = message;
            return this;
        }

        /**
         * @return contentType
         */
        public String getContentType() {

            return this.contentType;
        }

        public Builder contentType(String contentType){
            this.contentType = contentType;
            return this;
        }

        /**
         * @return contentEncoding
         */
        public String getContentEncoding() {

            return this.contentEncoding;
        }

        public Builder contentEncoding(String contentEncoding) {
            this.contentEncoding = contentEncoding;
            return this;
        }

        /**
         * @return contentLength
         */
        public int getContentLength() {

            return this.contentLength;
        }

        public Builder contentLength(int contentLength) {
            this.contentLength = contentLength;
            return this;
        }

        public Response build() {

            return new Response(this);
        }
    }
}
